package file.day9_18.day03;

import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.Scanner;

public class PWDemo {
    public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {
        PrintWriter pw = new PrintWriter("pw.txt","UTF-8");//要写出的文件名和字符集类型

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入");
        pw.println(scanner.nextLine());//按行写出到pw.txt
        System.out.println("写出完毕");
        pw.close();

    }
}
